#include<iostream>
#include<math.h>
using namespace std;
main()
{
      int A,B;
      cout << "vvedi 2 chisla  " << endl;
      cin >> A >> B;
      if (A%2==0||B%2==0)
          cout << "1";
      else
          cout<<"0";
      return 0;
}
